package com.example.intentfiltertester;

import android.app.ListActivity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

public class BaseListActivity extends ListActivity {
    @Override
    public boolean onCreatePanelMenu(int featureId, Menu menu) {
        menu.add(0, 1, 0, "Intent test");
        menu.add(0, 2, 0, "Receiver test");
        return super.onCreatePanelMenu(featureId, menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        finish();
        switch (item.getItemId()) {
        case 1:
            startActivity(new Intent(this, IntentTestActivity.class));
            break;
        case 2:
            startActivity(new Intent(this, ReceiverTestActivity.class));
            break;
        }
        return super.onOptionsItemSelected(item);
    }
}
